<!-- format 暂时注了 TODO -->
<nz-year-picker *ngIf="record.type === 'date' &&
(record.options.format === 'YYYY'||record.options.format === 'yyyy') &&
record.options.range === false; else yearElse"
[ngModel]="_value"
[nzFormat]="format"
[nzShowTime]="isDateTime"
(ngModelChange)="change($event)"
[ngStyle]="{'width': record.options.width}"
[nzAllowClear]="record.options.clearable"
[nzPlaceHolder]="record.options.placeholder"></nz-year-picker>
<ng-template #yearElse>
  <nz-month-picker *ngIf="record.type === 'date' &&
 ( record.options.format === 'YYYY-MM'|| record.options.format === 'yyyy-MM') &&
  record.options.range === false; else monthElse"
  [ngModel]="_value"
  [nzShowTime]="isDateTime"
  [nzFormat]="format"
  (ngModelChange)="change($event)"
  [ngStyle]="{'width': record.options.width}"
  [nzAllowClear]="record.options.clearable"
  [nzPlaceHolder]="record.options.placeholder"
  [nzDisabled]="isDisabled"
></nz-month-picker>
<ng-template #monthElse>
  <nz-date-picker 
  [ngModel]="_value"
  [nzFormat]="format"
  [nzShowTime]="isDateTime"
  (ngModelChange)="change($event)"
  *ngIf="record.type === 'date' && record.options.range === false"
  [ngStyle]="{'width': record.options.width}"
  [nzAllowClear]="record.options.clearable"
  [nzPlaceHolder]="record.options.placeholder"
  [nzDisabled]="isDisabled"
  ></nz-date-picker>
  <nz-range-picker 
    [nzMode]="mode"
    [ngModel]="_value"
    [nzFormat]="format"
    [nzShowTime]="isDateTime"
    (ngModelChange)="change($event)"
    *ngIf="record.type === 'date' && record.options.range === true"
    [ngStyle]="{'width': record.options.width}"
    [nzAllowClear]="record.options.clearable"
    [nzDisabled]="isDisabled"
  ></nz-range-picker>
</ng-template>
</ng-template>

